package cn.wolfcode.luowowo.member.mapper;

import cn.wolfcode.luowowo.member.domain.UserInfo;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

public interface UserInfoMapper {
    int deleteByPrimaryKey(Long id);

    int insert(UserInfo record);

    UserInfo selectByPrimaryKey(Long id);

    List<UserInfo> selectAll();

    int updateByPrimaryKey(UserInfo record);

    int selectCountByPhone(String phone);

    UserInfo selectByUsernameAndPassword(@Param("username") String username, @Param("password") String password);

    String selectFansByUid(Long uid);

    String selectFollwersByUid(Long uid);

    Integer selectHoney(Long id);


    void updateHeadImgUrl(@Param("uid") Long uid,@Param("pic") String pic);

    int updateUserInfo(UserInfo user);

    //更新密码
    void updatepassword(@Param("rpassword1")String rpassword1,@Param("phone")String phone);

    //更新邮箱
    void updateEmailById(@Param("email")String email, @Param("id")Long id);

    //注销用户
    void updateStateById(@Param("state")int state,@Param("id") Long id);

    //更换手机
    void updatePhoneById(@Param("phone")String phone, @Param("id")Long id);

    //修改金币
    void updateScore(@Param("id") Long id, @Param("score") BigDecimal score);


}